html,
body,
#root {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, Microsoft YaHei, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
    'Segoe UI Symbol', 'Noto Color Emoji';
}

.colorWeak {
  filter: invert(80%);
}

.ant-pro-sider.ant-layout-sider.ant-pro-sider-fixed {
  top: 60px;
  left: unset;
  height: calc(100% - 60px);
}

canvas {
  display: block;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

ol,
ul,
dl {
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 768px) {
  .ant-table {
    width: 100%;
    overflow-x: auto;

    &-thead > tr,
    &-tbody > tr {
      > th,
      > td {
        white-space: pre;

        > span {
          display: block;
        }
      }
    }
  }
}

.ant-table-row:nth-child(odd) {
  .ant-table-cell,
  .ant-table-cell-fix-left,
  .ant-table-cell-fix-right {
    background: #f8f9fa;
  }
}

.ant-table-wrapper.include-table-split-line {
  .ant-table-body {
    table {
      border-bottom: 1px solid #d0d5df;
    }
  }
}

.table-split-line {
  table {
    border-bottom: 1px solid #d0d5df;
  }
}

.ant-table-wrapper {
  .ant-table-summary {
    td {
      font-weight: 600;
    }
  }
}

.ant-table-empty {
  img {
    padding-top: 25px;
  }

  p {
    padding-bottom: 25px;
  }
}

.ant-badge .ant-badge-count {
  color: @colorTextBase;
}

.ant-pro-global-header-logo img {
  height: 24px;
}

.ant-pro-layout {
  .ant-pro-sider-logo {
    padding-block: 18px;
  }

  .ant-pro-sider {
    .ant-layout-sider-children {
      padding-inline: 0;
    }

    .ant-pro-base-menu-inline .ant-pro-base-menu-inline-submenu-has-icon > .ant-menu-sub {
      padding-inline-start: 0;
    }

    .ant-menu-inline .ant-menu-item,
    .ant-menu-inline .ant-menu-submenu-title {
      width: 100%;
      border-left: 4px solid transparent;
      border-radius: 0;
      padding-inline: 20px;
      margin-block: 0;
      margin-inline: 0;
    }

    .ant-menu-light .ant-menu-item-selected {
      border-left: 4px solid @colorPrimary;
    }

    .ant-menu-light.ant-pro-base-menu-vertical-collapsed {
      .ant-menu-item-selected {
        border-width: 0;
      }
    }

    .ant-menu-inline .ant-menu-item,
    .ant-menu-inline > .ant-menu-submenu > .ant-menu-submenu-title {
      height: 48px;
      line-height: 48px;
    }

    .ant-pro-base-menu-vertical.ant-pro-base-menu-vertical-collapsed .ant-menu-item,
    .ant-menu-submenu-popup .ant-menu-vertical .ant-menu-item,
    .ant-pro-base-menu-vertical.ant-pro-base-menu-vertical-collapsed
      .ant-menu-submenu
      > .ant-menu-submenu-title {
      width: 100%;
      margin: 0 !important;
      padding: 0 !important;
    }

    .ant-pro-base-menu-vertical-collapsed .ant-pro-sider-link {
      text-align: center;
    }

    .ant-pro-base-menu-inline-menu-item,
    .ant-pro-base-menu-inline-submenu {
      text-indent: 6px;
    }

    .ant-pro-sider-menu > .ant-pro-base-menu-inline-menu-item,
    .ant-pro-sider-menu > .ant-pro-base-menu-inline-submenu {
      text-indent: 0;
    }

    .ant-pro-sider-links {
      border-top: 1px solid #e0e0e0;
    }

    .ant-menu-item,
    .ant-menu-submenu-title {
      padding-left: 10px !important;
    }

    .ant-menu .ant-menu-item .anticon,
    .ant-menu .ant-menu-submenu-title .anticon {
      min-width: 16px;
      font-size: 16px;
    }

    .ant-pro-base-menu-inline-item-title {
      gap: 12px;
    }

    .ant-menu-submenu-title + .ant-menu {
      li {
        padding-left: 46px !important;
      }
    }

    .ant-menu-submenu-arrow {
      width: 9px;
    }

    .ant-menu-submenu-arrow::before,
    .ant-menu-submenu-arrow::after {
      width: 6px;
      height: 1.5px;
    }

    .ant-menu .ant-menu-submenu-arrow {
      color: #828387;
    }

    .ant-menu-light .ant-menu-submenu-selected > .ant-menu-submenu-title {
      .ant-menu-submenu-arrow {
        color: #1a6cfe;
      }
    }
  }

  .ant-layout-sider-collapsed {
    flex: 0 0 60px !important;
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;

    .ant-pro-sider-link {
      color: @colorPrimary;
      text-align: center;
    }
  }
}

.ant-pro-layout-content {
  min-height: calc(100vh - 60px);

  .ant-pro-page-container-warp-page-header {
    padding-block-start: 14px;
    padding-block-end: 14px;

    .ant-page-header-breadcrumb {
      padding-block-start: 0;
    }
  }

  .ant-pro-page-container {
    display: flex;
    flex-direction: column;
    height: 100%;

    .ant-pro-grid-content {
      flex: 1;

      .ant-pro-grid-content-children,
      .ant-pro-page-container-children-container {
        height: 100%;
      }
    }
  }
}

.ant-page-header-breadcrumb li {
  &:nth-child(2) {
    display: none;
  }
}

.ant-modal {
  .ant-modal-content {
    padding-bottom: 30px;
    border-radius: 4px;
  }

  .ant-modal-header {
    margin-right: -24px;
    margin-bottom: 22px;
    margin-left: -24px;
    padding-right: 24px;
    padding-bottom: 18px;
    padding-left: 24px;
    border-bottom: 1px solid @colorBorder;

    .ant-modal-title {
      font-size: 20px;
    }
  }

  .ant-modal-footer {
    margin-top: 10px;
  }

  .ant-modal-close {
    top: 22px;
  }

  .ant-modal-footer {
    & > div {
      justify-content: center !important;
    }
  }
}

.ant-pro-form-group-title {
  margin-bottom: 15px;
  font-size: 16px;
}

.ant-pro-form-login-header {
  margin-bottom: 24px;

  .ant-pro-form-login-title {
    color: @colorPrimary;
    font-size: 24px;
  }
}

.ant-select-single.ant-select-sm .ant-select-selector,
.ant-picker-small .ant-picker-input > input {
  font-size: 12px;
}

.ant-picker-small {
  padding-top: 3px;
  padding-bottom: 3px;
}

.ant-btn-icon {
  margin-bottom: 2px;
  vertical-align: 1px;
  margin-inline-end: 1px !important;
}

.ant-btn > .anticon + span {
  margin-inline-start: 4px;
}

.ant-switch {
  min-width: 57px;
}

.ant-pro-global-footer {
  margin-block-end: 50px;
}

.ant-pro-form-login-container {
  justify-content: center;
}

.ant-table-wrapper .ant-table-row-expand-icon {
  border: 1px solid #d9d9d9;
}

//动态路由，底部重复渲染
.ant-pro-sider-actions {
  display: none !important;
}

.react-flow__panel.react-flow__attribution {
  opacity: 0;
}

.ant-image-preview-root .ant-image-preview-wrap {
  z-index: 999999;
}

.ant-select-suffix {
  width: 10px;
  height: 10px;
  color: #828387;
  background: url('data:image/svg+xml;charset=utf-8;base64,PHN2ZyB0PSIxNzEyOTk5Njc2NzM0IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjM1MzgiIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj48cGF0aCBkPSJNNTEyIDc4OC40NTIyNjYxM2MtMTkuNzQ2NTg5NiAwLTI5LjYxOTg4NTU2LTkuODczMjk1OTctNDkuMzY2NDc1MTctMTkuNzQ2NTkxOTJsLTQ1NC4xNzE1Nzk2LTQyNC41NTE2OTE2OCA5OC43MzI5NTI2OS05OC43MzI5NTI3MSA0MDQuODA1MTAyMDggMzg1LjA1ODUxMjQ3IDQwNC44MDUxMDIwOC0zODUuMDU4NTEyNDcgOTguNzMyOTUyNjkgOTguNzMyOTUyNzEtNDU0LjE3MTU3OTYgNDI0LjU1MTY5MTY4Yy0xOS43NDY1ODk2IDkuODczMjk1OTctMjkuNjE5ODg1NTYgMTkuNzQ2NTg5Ni00OS4zNjY0NzUxNyAxOS43NDY1OTE5MnoiIGZpbGw9IiM4MjgzODciIHAtaWQ9IjM1MzkiPjwvcGF0aD48L3N2Zz4=');
  background-repeat: no-repeat;
  background-position: center right;
  background-size: 10px;

  svg {
    display: none !important;
  }
}

.ant-form-item {
  margin-bottom: 20px;
  .ant-form-item-label {
    overflow: visible;
    white-space: wrap;
  }
}

// 暂时修复 a 标签样式问题，后续排查生产环境编译样式问题
a {
  color: #1a6cfe;
  text-decoration: none;
  background-color: transparent;
  outline: none;
  cursor: pointer;
  transition: color 0.3s;
  -webkit-text-decoration-skip: objects;
}

.ant-select-selection-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  padding-inline: 3px;
  padding-block: 1px;
}
